<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>插槽</title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="app">
    <Child :msg-content="msg">
      <template #h1><h1>{{h1}}</h1></template>
      <template #default="{msg}">
        <h2>header 2 {{msg}}</h2>
        <h3>header 3</h3>
      </template>
    </Child>
    <button @click="msg='aaa'">change</button>
  </div>
  <script type="module">
    import { Child } from './Child.js'
    var app = new Vue({
      el: '#app',
      components: {
        Child
      },
      data() {
        return {
          h1: 'header 1',
          msg: 'hello child'
        }
      }
    })
  </script>
</body>
</html>